﻿using Trentacular.SharePoint.WSPUtil.CabinetFile;

namespace Trentacular.SharePoint.WSPUtil
{
    public class CabinetContainer
    {
        public TCabinetFile CabinetFile { get; private set; }

        public CabinetContainer(string filePath, string outputDirectory)
        {
            CabinetFile = new TCabinetFile(filePath)
            {
                IgnoreInsidePath = false,
                OutputDirectory = outputDirectory
            };
        }

        public void Extract(string fileToExtract)
        {
            CabinetFile.Extract(fileToExtract);
        }

        public void ExtractAll()
        {
            CabinetFile.ExtractAll();
        }
    }
}
